#ifndef _WEAPON_
#define _WEAPON_

#include "aerial\Core\base.h"

#include "hge\hgeresource.h"
#include "aerial\Game\GameObject\GameObject.h"

class FlyObject;

#define TYPE_WEAPON_VULCAN 0

/// @brief basic class for all weapon
class Weapon: public GameObject 
{
public:
	static void InitializeCounter();
	static int assignID();
	/**
	 * @brief before add to IFCS, all pointers below must be NULL
	 */
	Weapon(float x, float y, FlyObject* fo = 0): GameObject(x, y, assignID()), host(fo) {} 
	Weapon(float x, float y, float A, FlyObject* fo = 0): GameObject(x, y, assignID(), A), host(fo) {}
	Weapon(float x0, float y0, float x1, float y1, FlyObject* fo = 0): GameObject(x0, y0, x1, y1, assignID()), host(fo) {}
	virtual ~Weapon() {}
	void setHost(FlyObject* fobjs) { host = fobjs; }
	inline FlyObject* GetHost() { return host; }
	/**
	 * @updated each frame.
	 *
	 * @param dt time passed since last called
	 *
	 * @return whether the weapon is about to be destroyed.
	 */
	virtual bool update(float dt) {	return false;}
	virtual void render() {}
	inline virtual uchar GetObjectType() { return TYPE_WEAPON; }
	inline virtual uchar GetWeaponType() = 0;
protected:
	FlyObject* host;
	static int weaponID;
};

#endif 